{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "https://leetcode.com/problems/distribute-candies\n",
    "\n",
    "\n",
    "Runtime: 840 ms, faster than 26.93% of Python3 online submissions for Distribute Candies.\n",
    "Memory Usage: 16.3 MB, less than 38.72% of Python3 online submissions for Distribute Candies.\n",
    "\n",
    "\n",
    "\n",
    "```python\n",
    "class Solution:\n",
    "    def distributeCandies(self, candyType: List[int]) -> int:\n",
    "        #6:10\n",
    "        typeSet = set(candyType)\n",
    "        typeNums = len(typeSet)\n",
    "        nums = len(candyType)//2\n",
    "        if typeNums <= nums:\n",
    "            return typeNums\n",
    "        else:\n",
    "            return nums\n",
    "```\n",
    "\n",
    "\n",
    "Spent 3 minutes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
